package com.rng.dateless;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by tkoh on 27.10.2014.
 */
public class DBHelper extends SQLiteOpenHelper {
    public static final String TABLE_NAME = "dates";
    public static final String COL_DATE = "date";
    public static final String COL_DESCRIPTION = "description";
    public static final String COL_RECURRENCE = "recurrence";
    public DBHelper(Context context){
        super(context, "storage", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("create table "+TABLE_NAME+ "("
                + "id integer primary key autoincrement,"
                + COL_DATE+" datetime,"
                + COL_DESCRIPTION+" text,"
                + COL_RECURRENCE+ " text" + ");");
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int i, int i2) {

    }
}